/*
 * @Descripttion:
 * @version:
 * @Author: liwanpeng
 * @Date: 2020-12-14 14:46:16
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2021-03-29 19:44:41
 */
import store from "@tapui/store"

import Layout from "@tapui/views/layout/Layout"
import misRouter from "@misui/router"
import { resolve } from "tinymce"

let addRouterMap = [
  {
    path: "/",
    component: Layout,
    hidden: true,
    redirect: "dashboard",
    children: [
      {
        path: "dashboard",
        component: resolve =>
          require(["../views/mpm/projectIndex/index.vue"], resolve),
        name: "首页",
        meta: { title: "首页", icon: "index", keepAlive: true, componentName: 'mpmIndex' }
      }
    ]
  },
  {
    path: "/mpm",
    component: Layout,
    hidden: true,
    redirect: "noredirect",
    children: [
      {
        path: "projectInfo",
        component: resolve =>
          require(["../views/mpm/projectInfo/index.vue"], resolve),
        name: "projectInfoIndexForTrace",
        meta: { title: "项目运作", icon: "index", keepAlive: true, componentName: 'projectInfoIndexForTrace' }
      },
      {
        path: "projectIndexForQuery",
        component: resolve =>
          require(["../views/mpm/mpmProject/indexForQuery.vue"], resolve),
        name: "projectIndexForQuery",
        meta: { title: "项目-查询", icon: "index", keepAlive: false }
      },
      {
        path: "projectInfoForQuery",
        component: resolve =>
          require(["../views/mpm/projectInfo/indexForQuery.vue"], resolve),
        name: "projectInfoIndexForQuery",
        meta: { title: "项目追踪-查询", icon: "index", keepAlive: true, componentName: 'projectInfoIndexForQuery' }
      },
      {
        path: "projectMilepostJump/:qry_permission/:qry_overdue",
        component: resolve =>
          require([
            "../views/mpm/mpmProjectMilepost/indexQueryJump.vue"
          ], resolve),
        name: "projectMilepostJump",
        meta: { title: "超期里程碑及任务", icon: "index", keepAlive: false }
      },
      {
        path: "projectForIndexJump/:qry_permission/:qry_overdue",
        component: resolve =>
          require(["../views/mpm/mpmProject/indexOverdate.vue"], resolve),
        name: "projectForIndexJump",
        meta: { title: "超期项目", icon: "index", keepAlive: false }
      },
      {
        path: "myPendingApprovalList",
        component: resolve =>
          require([
            "../views/cbo/cboApprovalNodeIns/approvalList"
          ], resolve),
        name: "myPendingApprovalList",
        meta: { title: "我的待办", icon: "index", keepAlive: false }
      },
      {
        path: "myTaskList",
        component: resolve =>
          require(["../views/mpm/mpmProjectTask/indexMyTask.vue"], resolve),
        name: "myTaskList",
        meta: { title: "我的任务", icon: "index", keepAlive: false }
      },
      {
        path: "mpmOverTask/:qry_permission/:qry_overdue",
        component: resolve =>
          require(["../views/mpm/mpmProjectTask/indexOverdate.vue"], resolve),
        name: "mpmOverTask",
        meta: { title: "超期任务", icon: "index", keepAlive: false }
      },
      {
        path: "projectInfoFile",
        component: resolve =>
          require(["../views/mpm/projectInfo/indexForFile.vue"], resolve),
        name: "projectInfoFileIndex",
        meta: { title: "项目追踪-归档", icon: "index", keepAlive: false }
      },
      {
        path: "mpm/appointmentForIndexJump/:qry_permission/:qry_overdue",
        component: resolve =>
          require(["../views/mpm/mpmProject/appointmentOverdate.vue"], resolve),
        name: "appointmentForIndexJump",
        meta: { title: "任命超期", icon: "index", keepAlive: false }
      },
      {
        path: "mpm/planForIndexJump/:qry_permission/:qry_overdue",
        component: resolve =>
          require(["../views/mpm/mpmProject/planOverdate.vue"], resolve),
        name: "planForIndexJump",
        meta: { title: "策划超期", icon: "index", keepAlive: false }
      },
      {
        path: "mpm/appointmentForBacklog/:qry_permission/:qry_overdue",
        component: resolve =>
          require(["../views/mpm/mpmProject/appointmentOverdate.vue"], resolve),
        name: "appointmentForBacklog",
        meta: { title: "任命待办", icon: "index", keepAlive: false }
      },
      {
        path: "mpm/planForBacklog/:qry_permission/:qry_overdue",
        component: resolve =>
          require(["../views/mpm/mpmProject/planOverdate.vue"], resolve),
        name: "planForBacklog",
        meta: { title: "策划待办", icon: "index", keepAlive: false }
      }
    ]
  },
  {
    path: "/progressGanttFullScreen",
    component: resolve =>
      require(["../views/mpm/mpmProjectProgress/progressGantt.vue"], resolve),
    name: "progressGanttFullScreen",
    meta: { title: "项目进度-甘特图", icon: "index", keepAlive: false }
  }
]
addRouterMap = [...misRouter, ...addRouterMap]
store.dispatch("MergeRoutes", addRouterMap)
